package com.ftg.learn.chapter08.rdbms.entity;

import com.ftg.learn.chapter08.rdbms.util.SexEnum;

import java.util.Objects;

/**
 * @author kangjx
 * @createTime 2023/1/4
 */
public class RStudent {

    /**
     * 主键:
     * 唯一性，不能为空，不能重复
     */
    private int sno;

    private String name;

    private SexEnum sex;

    private int age;

    /**
     * 外键：
     * 班级编号
     * 要么为空，代表这个人还没有分配班级
     * 不为空 ， 这个值必须是班级的真实的no
     */
    private Integer clazzNo;

    public RStudent(){}

    public RStudent(int sno, String name, SexEnum sex, int age, Integer clazzNo) {
        this.sno = sno;
        this.name = name;
        this.sex = sex;
        this.age = age;
        this.clazzNo = clazzNo;
    }

    public int getSno() {
        return sno;
    }

    public void setSno(int sno) {
        this.sno = sno;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public SexEnum getSex() {
        return sex;
    }

    public void setSex(SexEnum sex) {
        this.sex = sex;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Integer getClazzNo() {
        return clazzNo;
    }

    public void setClazzNo(Integer clazzNo) {
        this.clazzNo = clazzNo;
    }
}
